{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<style type="text/css">
.page{float:left;}
</style>
<script type="text/javascript">
$(function(){
	$('th[type="order"]').click(function() {
		var order = $(this).attr('field') + '-' + $(this).attr('order');
		$('#order').val(order);
		$('input[name="search"]').click();
		}).css({'cursor': 'pointer', 'color': '#36c'});
		var order = $('#order').val().split('-');
		var field = $('th[type="order"][field="' + order[0] + '"]');
		if (order[1] == 'ASC') {
		field.attr('order', 'DESC').text(field.text() + '↑');
		} else {
		field.attr('order', 'ASC').text(field.text() + '↓');
		}
		if (order[0] != 'reg_time') {
		$('th[type="order"][field="reg_time"]').attr('order', 'DESC');
		}
});
</script>
<body>
<div class="sub-body" style="width: 1050px">
	<form method="get">
		<table width="100%" cellspacing="0" cellpadding="0" class="search">
			<tr>
				<th width="80">用户：</th>
				<td width="160"><input name="user_name" type="text" value="{$smarty.get.user_name|escape}" /></td>
				<th width="80">电子邮箱：</th>
				<td width="160"><input name="email" type="text" value="{$smarty.get.email|escape}" /></td>
				<th width="80">手机：</th>
				<td width="160"><input name="phone_mob" type="text" value="{$smarty.get.phone_mob|escape}" /></td>
				<td width="80" rowspan="2">
					<input name="app" id="app" type="hidden" value="schedule" />
					<input name="act" id="act" type="hidden" value="consumer_list" />
					<input type="hidden" name="order" id="order" value="{if $smarty.get.order}{$smarty.get.order}{else}reg_time-DESC{/if}" />
					<input type="submit" name="search" value="查询" class="inquiry" /></td>
			</tr>
			<tr>
				<th>QQ：</th>
				<td><input name="im_qq" type="text" value="{$smarty.get.im_qq|escape}" /></td>
				<th>公司：</th>
				<td><select name="company_id" id="company_id">
			          <option value=" "></option>
					  <!--{foreach from=$company_list item=company}-->
			          <option value="{$company.company_id}" {if $company.company_id == $smarty.get.company_id}selected{/if}>{$company.company_name|escape}</option>
					  <!--{/foreach}-->
			        </select>
			    </td>
				<th>品牌：</th>
				<td>
					<select name="brand_id" id="brand_id">
			          <option value="0"></option>
					  <!--{foreach from=$brand_list item=brand}-->
			          <option value="{$brand.brand_id}" {if $brand.brand_id == $smarty.get.brand_id}selected{/if}>{$brand.brand_name|escape}&nbsp;&nbsp;({$brand.company_name|escape})</option>
					  <!--{/foreach}-->
			        </select>
				</td>
			</tr>
		</table>
	</form>
	<div class="tab_info" style="width:1050px;">
		<div class="tab-title-1"><span>{$lang.consumer_list} </span></div>
		<table width="100%" cellspacing="0" cellpadding="0" class="tab-display" id="tab-color1">
			<tr>
				<th width="10%" type="order" field="reg_time" order="ASC">注册日期</th>
				<th width="8%">用户</th>
				<th width="5%" type="order" field="country" order="ASC">国家</th>
				<th width="8%" type="order" field="company_name" order="ASC">公司</th>
				<th width="8%">品牌</th>
				<th width="3%" type="order" field="activation" order="ASC">激活</th>
				<th width="8%" type="order" field="merch_name" order="ASC">跟单</th>
				<th width="8%">手机</th>
				<th width="8%">电话</th>
				<th width="8%">QQ</th>
				<th width="12%">电子邮箱</th>
				<th>{$lang.handle}</th>
			</tr>
			<!--{foreach from=$member_list item=members}-->
			<tr>
				<td>{$members.reg_time|date}</td>
				<td>{$members.user_name|truncate:30}</td>
				<td>{$members.country}</td>
				<td>{$members.company_name}</td>
				<td>{$members.brand_name}</td>
				<td><!--{if $members.activation}-->{$lang.yes}<!--{else}-->{$lang.no}<!--{/if}--></td>
				<td>{$members.merch_name}</td>
				<td>{$members.phone_mob}</td>
				<td>{$members.phone_tel}</td>
				<td>{$members.is_qq}</td>
				<td align="left">{$members.email}</td>
				<td>{if $user_info.role eq USER_MERCHANDISER && !$members.activation}<a href="{url app=member&act=edit_user&uid=$members.user_id}">编辑</a>|<a href="javascript:if(confirm('确认激活此用户吗?')==true){location.href='{url app=member&act=activation_user&uid=$members.user_id}';};">激活</a>|{/if}<a href="{url app=member&act=view_user&uid=$members.user_id}">查看</a></td>
			</tr>
			<!--{/foreach}-->
		</table>
		{include file=page.html}
		<script language="javascript" type="text/javascript" src="{res file=js/tab_color.js}"></script> 
	</div>
	</div>
</body>
</html>